
package com.cmc.service.impl;

import java.util.List;

import com.cmc.service.impl.BaseManager;
import com.cmc.model.SysAnnounce;
import com.cmc.dao.SysAnnounceDao;
import com.cmc.service.SysAnnounceManager;

public class SysAnnounceManagerImpl extends BaseManager implements SysAnnounceManager {
    private SysAnnounceDao dao;

    /**
     * Set the Dao for communication with the data layer.
     * @param dao
     */
    public void setSysAnnounceDao(SysAnnounceDao dao) {
        this.dao = dao;
    }

    /**
     * @see com.cmc.service.SysAnnounceManager#getSysAnnounces(com.cmc.model.SysAnnounce)
     */
    public List getSysAnnounces(final SysAnnounce sysAnnounce) {
        return dao.getSysAnnounces(sysAnnounce);
    }

    /**
     * @see com.cmc.service.SysAnnounceManager#getSysAnnounce(String id)
     */
    public SysAnnounce getSysAnnounce(final String id) {
        return dao.getSysAnnounce(new Long(id));
    }

    /**
     * @see com.cmc.service.SysAnnounceManager#saveSysAnnounce(SysAnnounce sysAnnounce)
     */
    public void saveSysAnnounce(SysAnnounce sysAnnounce) {
        dao.saveSysAnnounce(sysAnnounce);
    }

    /**
     * @see com.cmc.service.SysAnnounceManager#removeSysAnnounce(String id)
     */
    public void removeSysAnnounce(final String id) {
        dao.removeSysAnnounce(new Long(id));
    }
}
